Skip to content

docs: add docstrings to undocumented functions in utils.py#1399

Open
mastash3ff wants to merge 1 commit into
simonw:mainfrom
mastash3ff:docs/add-docstrings-utils
Open

docs: add docstrings to undocumented functions in utils.py#1399
mastash3ff wants to merge 1 commit into
simonw:mainfrom
mastash3ff:docs/add-docstrings-utils

Conversation

@mastash3ff
Copy link
Copy Markdown

Summary

Several utility functions in llm/utils.py were missing docstrings, making it harder to understand their purpose when reading the source or generated API docs.

This PR adds docstrings to eight previously undocumented public symbols, matching the existing one-liner or short-paragraph style already used in the file:

  • Fragment — class-level docstring explaining the source-attribution role
  • mimetype_from_string / mimetype_from_path — describe magic-byte detection and None return
  • dicts_to_table_string — describe column-justified plain-text table output
  • make_schema_id — describe the BLAKE2b hash and return tuple
  • resolve_schema_input — enumerate the four accepted input formats
  • ensure_fragment / ensure_tool — describe upsert semantics and returned id

No logic, behaviour, or tests are changed.

Add module-level docstrings to Fragment, mimetype_from_string,
mimetype_from_path, dicts_to_table_string, make_schema_id,
resolve_schema_input, ensure_fragment, and ensure_tool. No logic
or behaviour changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant